#! /usr/bin/python -tt

###### Immutable objects

### Numbers
n1 = 5
n2 = n1
print n1, n2
n1 += 9000
print n1, n2

### Strings
s1 = 'foo'
s2 = s1
print (s1, s2)
s1 += 'bar'
print (s1, s2)

try:
	s1[0] = '0'
except Exception, e:
	print e

### Tuples
t1 = ('x','y','z')
t2 = t1
print t1, t2
t1 = t1[1:2]
print t1, t2

try:
	t1[0] = '0'
except Exception, e:
	print e

##### Mutable objects

### Lists
l1 = [1, 2, 3, 4, 5]
l2 = l1
print l1, l2
l1[0] = 9000
print l1, l2

l1 = l1[2:4]
print l1, l2

### Sets
se1 = {1, 2, 3}
se2 = se1
print se1, se2
se1 |= {4, 5}
print se1, se2

### Dictionaries
d1 = {'a':10, 'b':20}
d2 = d1
print d1, d2
d1['z'] = 9000
print d1, d2
